Adaptive power control

ABSTRACT

A method for controlling the power used by a computer including the steps of measuring the operating characteristics of a central processor of the computer, determining when the operating characteristics of the central processor are significantly different than required by the operations being conducted, and changing the operating characteristics of the central processor to a level commensurate with the operations being conducted.

This application is a continuation application of the U.S. patent application with Ser. No. 11/411,309, filed Apr. 25, 2006, by Halepete et al., and entitled “Adaptive Power Control,” now U.S. Pat. No. 7,596,708, which in turn is a continuation application of U.S. Pat. No. 7,100,061, Ser. No. 09/484,516, filed Jan. 18, 2000, by Halepete et al., and entitled “Adaptive Power Control,” each of which is hereby incorporated by reference in entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to computer systems and, more particularly, to methods for varying the amount of power used by such systems during use of the systems.

2. History of the Prior Art

A significant problem faced by battery powered computers is the length of time such computers are capable of operating between charges. As computer processors become more capable, they tend to run at faster speeds and dissipate more power. At the same time, the size and weight of portable computers is constantly being reduced to make them more portable. Since batteries tend to be a very significant element of the weight of portable computers and other portable devices, the tendency has been to maintain their size and thus their capacity at a minimum.

A typical portable computer today has an average life of approximately two and one-half hours until its originally-full battery must be recharged.

A great deal of research has been directed to ways for extending the operating life of portable computers. Presently, typical processors include circuitry and software for disabling various power-draining functions of portable computers when those functions are unused for some extensive period. For example, various techniques have been devised for turning off the screen when it has not been used for some selected period. Similar processes measure the length of time between use of hard drives and disable rotation after some period. Another of these processes is adapted to put a central processor into a quiescent condition after some period of inactivity.

In general, these processes are useful in extending the operating life of a portable computer. However, the life still does not extend significantly beyond two and one-half hours for any computer having significant capabilities.

There has been a significant amount of research conducted from which processor requiring less power might be produced. Most processors used in computer systems today are made using CMOS technology. The power consumed by a CMOS integrated circuit is given approximately by P=CV²f, where C is the active switching capacitance, V is the supply voltage, and f is the frequency of operation. The maximum allowable frequency is described by f_(max)=kV, where k is a constant.

It is desirable to operate the processor at the lowest possible voltage at a frequency that provides the computing power desired by the user at any given moment. For instance, if the processor is operating at 600 MHz, and the user suddenly runs a compute-intensive process half as demanding, the frequency can be dropped by a factor of two. This means that the voltage can also be dropped by a factor of two. Therefore, power consumption is reduced by a factor of eight. Various methods of implementing this dynamic voltage-frequency scaling have been described in the prior art. All of these involve a component separate from the processor on the system that provides multiple frequencies to multiple system components. Also, they involve state-machines or power-management units on the system to coordinate the voltage-frequency changes. The efficiency of voltage frequency scaling is reduced when the frequency generator is not on the processor. Having a separate power-management unit increases the number of components in the system and the power dissipated by the system. It is also desirable to have the processor control both the voltage it receives and the frequency it receives. As the level of integration increases in processors, they control most of the system clocks; and it is desirable to provide control to the processor to change these clocks so they can be run at just the right frequency. Having a separate clock generator that produces multiple frequencies is not desirable because of the lack of tight coupling.

It is desirable to increase significantly the operating life of portable computers and similar devices.

SUMMARY OF THE INVENTION

It is, therefore, an object of the present invention to increase significantly the operating life of portable computers.

This and other objects of the present invention are realized by a method for controlling the power used by a computer including the steps of utilizing control software to measure the operating characteristics of a processor of the computer, determining when the operating characteristics of the central processor are significantly different than required by the operations being conducted, and changing the operating characteristics of the central processor to a level commensurate with the operations being conducted.

These and other objects and features of the invention will be better understood by reference to the detailed description which follows taken together with the drawings in which like elements are referred to by like designations throughout the several views.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of various hardware components of a computer system utilized in accordance with the present invention.

FIG. 2 is a flow chart illustrating the operation of one embodiment of the invention.

FIG. 3 illustrates a number of registers utilized in the hardware components of the system shown in FIG. 1.

FIG. 4 is a block diagram illustrating the operation of sequencer circuitry which is a part of a processor illustrated in the system of FIG. 1.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of various hardware components of a computer system utilized in accordance with the present invention to control the operating frequency and voltage of the system. The hardware includes a processor 10, a clock generator 11, a programmable voltage generator 12, system memory (DRAM) 14, and an external battery (or other power supply) 13. The processor 10, clock generator 11, and voltage generator 12 are all mounted to a circuit board 15 in a manner known to those skilled in the art. The battery 13 and system memory 14 may be electrically connected to the circuit board in a number of possible ways known to those skilled in the art.

The processor 10 includes on the same semiconductor chip a number of components including a processing unit 16 and a programmable frequency generator 17. The processor 10 also typically includes a number of other components which are known to those skilled in the art but are not pertinent to the present invention and are therefore not illustrated. The processing unit 16 includes a number of logical components including a master control unit 18 which is the central portion for accomplishing clock and voltage control. In the present invention, the master control unit 18 also includes circuitry for monitoring the operating characteristics of the processor. Various monitoring functions (such as circuitry for accomplishing voltage and frequency monitoring) which are well known to the prior art are included as a part of the logical master control unit 18. The logical unit 18 may also include circuitry for making available additional information detected by other portions of the computer system in either analogue or digital form (e.g., temperature data). The logical unit 18 also includes circuitry for detecting other operations of the system including commands to be executed from which a particular type of operation to be executed may be determined. A detailed discussion of circuitry for providing various operating characteristics is included in U.S. patent application Ser. No. 09/417,930, entitled Programmable Event Counter System, B. Coon et al, filed Oct. 13, 1999, and assigned to the assignee of the present application.

The programmable frequency generator 17 receives an external frequency often referred to as a “slow clock” from the external clock generator 11. The generator 17 responds to values furnished by control software executing on the processor to produce from the slow clock a core clock for operation of the processing unit 16, one or more clocks for operation of the various system memory components shown as system memory 14 in the figure, the system bus, and any other components which might utilized a separate clock.

It should be specifically noted that contrasted to prior art systems, the programmable frequency generator is able to provide individual frequencies selectable for each of these components. Thus, prior art arrangements utilize an external clock generator to provide all of the different frequencies utilized by the system. This has a number of effects which are less than desirable. Since the clocks are generated off-chip, the time needed to change frequency is long. Since in an integrated processor all clocks are created from a single slow clock off chip, if the core frequency changes all of the frequencies change with it. Thus, a frequency furnished to a single component cannot be changed without affecting a change in other frequencies. The voltage furnished by the external clock generator does not change even though reduced frequencies adapted to provide reduced levels of operations are furnished for various components of the system. A number of other factors slow the response of the system to changes in the various clocks when an external clock is used to generate the various operating frequencies for a system.

The core frequency for the processing unit 16 is generated by multiplying the slow clock by a factor. This factor is computed by the control software of the present invention which monitors the operation of the processor to determine from the characteristics of the processor just what frequency should be selected. The manner in which the monitoring is accomplished and the effect it has on the control of the operating characteristics is described in detail below.

The frequencies at which the other components of the system operate are determined from the core frequency by multiplying the slow clock by the core processor factor. For example, a system input/output (I/O) bus typically functions at a much slower frequency than does the processing unit. In the present invention, the control software computes the bus frequency by dividing the core frequency by a value. The process may also be conducted as a table lookup of an already computed value. If the processing unit is conducting its current operations at a normal speed of 400 MHz, a bus frequency of 100 MHz [[.]] is derived by dividing the core clock by four. On the other hand, if the processing unit is capable of accomplishing its current operations at a relatively slow speed of 200 MHz, a bus frequency of 100 MHz [[.]] is still desirable since bus operations are often the limiting factor in processing operations. In such a case, the control software computes a value of two as the divisor to obtain the bus frequency. It should be noted that although the bus frequency under discussion has been the system I/O bus, the invention may also be used for precisely choosing the operating frequencies for other system buses.

Similarly, various processors are often capable of utilizing system memory having different characteristics one of which is switching speed.

A system may utilize a plurality of interfaces between the processing unit and system memory in order to provide different operating frequencies for system memory which is being utilized. The present invention allows this to be easily accomplished by utilizing different divisors to obtain different values from which the operating frequencies for different system memory units are determined. As will be noted in the following discussion, two different memory frequencies are utilized and more are possible.

Thus, by utilizing the phase-lock-loop generator 17 to determine a core clock frequency and dividing that frequency by a plurality of different values determined by the control software, the operating frequencies for the different components of the system may be individually controlled and furnished to other components of the processor without the necessity of crossing chip boundaries with the consequent slowing caused by negotiating the boundaries.

In order to allow the master control unit 18 to accomplish these operations, the processing unit 16 includes a number of registers which are utilized by the control software and the hardware. These include a master control register 20, a master status register 21, and a master clock divider register 22 which are illustrated in FIG. 3.

Of these registers, the clock divider register 22 stores, among other things, the multiplier computed by the control software for generating the core frequency, the value used as a divisor to obtain the bus frequency from the core frequency, a value used as a divisor to obtain a first system memory frequency from the core frequency, and a value used as a divisor to obtain a second system memory frequency from the core frequency. In addition, the clock divider register 22 stores values used for various other including an indication that a frequency change command has been received.

The master control register includes values pertinent to the present description including the voltage which is to be furnished to the processor as a part of the change of frequency. This register also stores a value indicating the time period allowed for accomplishing the phase-lock-loop relock operation. The master status register also stores the various values used as dividers and the value used as a multiplier to obtain the core frequency along with other significant information.

The various values stored in these registers are utilized, among other things, to control the operations of sequencer circuitry (illustrated in FIG. 4) which carries out the operations necessary to changing the frequency at which the components of the system operate. The sequencer circuitry carries out the series of steps required by which the phase-lock-loop circuitry is brought to the new frequency and relocked after the processor clock has been shut off.

The operations carried out by the sequencer commence at an idle state which represents the normal condition of the sequencer in the absence of a frequency change operation. When the change frequency command and values are received, the sequencer steps from the idle condition to first shut down the core clock and the clocks to the various memory interfaces. The sequencer then waits a few cycles before shutting down the bus clock, the master control clock, and saving information sufficient to assure that timing during and after the sequencing is correct. After this delay, the sequencer starts a counter to time the phase-lock-loop relock process. When this count is complete, the sequencer wakes the bus and the master control units. Finally, the sequencer wakes up the core and memory interfaces and awaits another frequency changing operation. The relation of the sequencer to the control software will be described in detail in the discussion of the process of the control software which follows.

FIG. 2 is a flow chart representing the process carried out by one embodiment of the invention. In the figure, the steps described in the left column represent operations accomplished by the control software, while the steps described in the right column represent operations accomplished by the cooperating hardware.

In a first step, the control software monitors various conditions of the processor which relate to power expenditure by the processor. These conditions may include any of those described above including the present frequency and voltage of operation, the temperature of operation, and the amount of time the processor spends in one of what may be a number of idle states in which various components of the system are quiescent. For example, if the processor is running in what might be termed its normal mode of operation at a core frequency of 400 MHz and a voltage of 1.3 volts, the control software may be monitoring the amount of time the processor spends in the “halt” state, the amount of time the processor spends in the “deep sleep” state, and the temperature of the processor. The deep sleep state is a state in which power is furnished only to the processor and to DRAM memory. In this state, the processor is arc all off and it does not respond to any interrupts. The halt state is a state in which the core clock has been stopped but the processor responds to most interrupts. If the processor is spending more than a preselected increment of its operation in these states while operating at normal frequency and voltage, then power is being wasted. The detection of such operating characteristics therefore may indicate that the frequency and voltage of operation should be reduced.

On the other hand, it may be found that the processor is functioning at a reduced frequency and voltage and that a series of commands have been furnished to be executed by the processor which require greater processing power. In such a case, these characteristics suggest that it may be desirable to increase the voltage and frequency of operation in order to handle these commands.

Consequently, the control software detects operating characteristics and determines whether those characteristics indicate that the frequency and voltage of operation should be changed. From the possible sets of conditions, the control software detects the particular set involved and computes correct values for the core clock frequency, the core clock frequency multiplier, the various DRAM clock frequency dividers, and the bus frequency divider. If any other components of the circuitry receive their own clocks, then multipliers or dividers for these values are computed. It should be noted that the control software may actually compute the various values required for the given characteristics which have been determined or may utilize a lookup table storing precomputed values.

At a next step, the software reviews the values computed and determines whether the frequency is to be increased. If the frequency is to be increased, it is first necessary that the voltage be increased to allow the processor to function at a higher frequency. In such a case, it is first necessary to increase the voltage level of operation. The typical power supplies offer a number of pins (often five) by which different operating voltages may be selected. This allows a range of different voltages to be provided. Consequently, the control software simply furnishes a correct value on the input pins of the power supply to cause the computed voltage to be furnished to the frequency generator and to the processor. In one embodiment, the voltage increase is accomplished by providing a level to be reached and a time period for the voltage to settle to this level.

It should be noted that the voltage may be increased in a single step, an action which would typically cause phase-locked-loop circuitry of a frequency generator to lose its lock and would create a large surge of current causing the currently-available voltage regulator circuitry to initiate a system reset. This problem may be eliminated with future voltage regulator circuitry. Alternatively, the voltage may be increased in a series of small steps which would not have this effect. For example, if increases of approximately 50 millivolts are enabled, then the frequency generator will remain stable during the voltage increase and a system reset will not occur. This offers the advantage that the processor may continue to execute commands during the period in which the voltage change is taking place.

If the control software was not increasing but rather decreasing frequency of operation at the previous step, then the original voltage level is not changed at this time. In either case, the control software then goes through a sequence of steps in which various operations of the processor are prepared for shutdown so that the system clocks can be changed. With a particular processor such as that referred to in the patent application described above, this includes flushing a gated store buffer, suspending bus and direct memory access (DMA) operations, and enabling self-refreshing circuitry for system DRAM memory.

With these processor operations shut down, the control software transfers the new divider values and writes a bit indicating a frequency change is to occur. The hardware stores the divider values in the clock divider register and the change frequency indicator. This starts the hardware process of the sequencer. The control software then writes “stop core,” “stop DRAM0” and “stop DRAM1” bits of the master command register to stop the clocks being furnished to these components.

Writing the master control register bits to stop the clock frequencies and the values to the hardware causes the hardware to commence the remainder of the frequency changing operation utilizing the sequencer circuitry described above. At this point, the software effectively goes into a wait state which continues until the core clock is enabled at the new frequency. The sequencer responds to the command by shutting down the core clock and the DRAM memory interfaces. The sequencer pauses for sufficient time to assure that this has happened and then shuts down the bus and master control clocks.

Because the core clock has been stopped, timing must be accomplished based on the external clock furnished to the system during this period. Counter circuitry dependent only on phase-lock-loop relock time is utilized to measure the time allowed for the phase-lock-loop circuitry to lock to the new frequency. At this point, the sequencer utilizes the new values furnished to effect a new value for the core (and other) frequency. After a safe lock period has passed (“relock time” stored in the master control register), the sequencer wakes the bus and master control units. The sequencer waits a few clocks of the slow frequency and then turns on the core clock and the DRAM interfaces.

Because the internal clocks of the system are shut down during the operation of the sequencer, it is necessary that the system provide a means of maintaining timing consistent with the normal world clock. Computer systems utilize a time stamp counter to keep track of world clock values. The value kept in this counter is utilized for certain operations conducted by the central processing unit. Once the phase-lock-loop circuitry of the frequency generator 17 has been stopped, the value in the time clock counter no longer represents accurate world time. Moreover, when the new frequency is reached and locks in, the rate at which the counter is iterated will change. To provide for accurate time stamp readings, a number of lower-valued bits indicating the last time of program execution held by the time stamp counter are stored. These are furnished to the control software along with the relock time value and the new frequency once the frequencies have restabilized to allow accurate computation of the normal world time.

Once the clocks have been turned on at the new frequencies, the control software ends its wait state and determines whether the operation was to decrease the frequency. Assuming the operation was to increase the frequency, the software then recalculates the time stamp counter value and checks the various interface timings to assure that they are correct. If the operation was to decrease the frequency, the control software causes the voltage to be lowered to the calculated value (either in one or a series of incremental steps) and then recalculates the value for the time stamp counter and checks the interface timings. At that point, the control software begins again to monitor the various conditions controlling the frequency and voltage of operation.

It should be noted that at some point during the monitoring operation it may be found that the processor is functioning at a normal frequency and voltage, that the temperature of operation is below some preselected value, and that a series of processor-intensive commands have been furnished to be executed by the processor. In such a case, these characteristics suggest that it may be desirable to increase the voltage and frequency of operation in order to handle these commands for a period less than would raise operating temperatures beyond a safe level. In such a case, the control software may compute higher frequency and voltage values and a temperature (or a time within which temperature will not increase beyond a selected level) in order to cause the hardware to move to this higher frequency state of operation. In such a case, the processor executing the process illustrated effectively ramps up the frequency and voltage so that the processor “sprints” for a short time to accomplish the desired operations. This has the effect of allowing a processor which nominally runs at a lower frequency to attain operational rates reached by more powerful processors during those times when such rates are advantageous.

Although the present invention has been described in terms of a preferred embodiment, it will be appreciated that various modifications and alterations might be made by those skilled in the art without departing from the spirit and scope of the invention. The invention should therefore be measured in terms of the claims which follow. 

What is claimed is:
 1. A computer system comprising: a processing unit operable at different voltages; a second component; and a frequency generator configured to receive a first clock signal from a clock generator and to adjust a frequency of said first clock signal to furnish clock signals at different frequencies to said processing unit and said second component, wherein said different frequencies are individually adjustable; wherein, in response to initiating a change in frequency for said processing unit, said processing unit is configured to start a counter and to shut down clocks to said processing unit and said second component; and wherein further, in response to said counter reaching a specified value, said processing unit is configured to turn on said clocks.
 2. The computer system of claim 1, wherein said frequency generator is configured to adjust said first clock signal by a first value to furnish a second clock signal at a second frequency to said processing unit, wherein said frequency generator is also configured to adjust said first clock signal by a second value to furnish a third clock signal at a third frequency to said second component, and wherein said second clock signal and said third clock signal are furnished concurrently by said frequency generator to said processing unit and said second component, respectively.
 3. The computer system of claim 2, wherein said second frequency is different from said third frequency.
 4. The computer system of claim 2, wherein said frequency generator is further configured to change said first value to a third value and to change said second value to a fourth value responsive to a change in operating conditions of said processing unit, wherein the ratio of said first value to said third value is different from the ratio of said second value to said fourth value.
 5. The computer system of claim 1, further comprising a power supply coupled to said processing unit and configured to furnish a selectable voltage to said processing unit.
 6. The computer system of claim 1, configured to detect operations to be executed and to adjust said frequencies according to said operations.
 7. The computer system of claim 1, configured to monitor a temperature of said processing unit and to adjust a frequency of a clock signal and a voltage furnished to said processing unit according to said temperature.
 8. The computer system of claim 1, configured to determine an increase in temperature that would result from an increase in said voltage, wherein said increase in voltage is permitted for a period that would not cause said temperature to exceed a temperature limit.
 9. The computer system of claim 1, wherein said second component is selected from the group consisting of: a memory; and an input/output bus.
 10. A computer system comprising: a processing unit operable at different voltages; a second component; a clock generator configured to generate a first clock signal at a frequency, said processing unit configured to register a value corresponding to an amount of time allowed for phase-locked-loop (PLL) circuitry to lock in response to a change in frequency of said first clock signal; and a frequency generator coupled to said clock generator and comprising said PLL circuitry, said frequency generator configured to adjust said frequency of said first clock signal to concurrently furnish clock signals at different frequencies to said processing unit and said second component, wherein said different frequencies are individually adjustable; wherein, in response to initiating said change in frequency, said processing unit is configured to start a counter and to shut down clocks to said processing unit and said second component; and wherein further, in response to said counter reaching said value, said processing unit is configured to turn on said clocks.
 11. The computer system of claim 10, wherein said frequency generator is configured to adjust said first clock signal by a first value to furnish a second clock signal at a second frequency to said processing unit, wherein said frequency generator is also configured to adjust said first clock signal by a second value to furnish a third clock signal at a third frequency to said second component, wherein said second frequency is different from said third frequency.
 12. The computer system of claim 11, wherein said frequency generator is further configured to change said first value to a third value and to change said second value to a fourth value responsive to said change in operating conditions, wherein the ratio of said first value to said third value is different from the ratio of said second value to said fourth value.
 13. The computer system of claim 10, configured to detect operations to be executed and to adjust said frequencies according to said operations.
 14. The computer system of claim 10, configured to monitor a temperature of said processing unit and to adjust a frequency of a clock signal and said voltage according to said temperature.
 15. The computer system of claim 10, configured to determine an increase in temperature that would result from an increase in said voltage, wherein said processing unit is configured to sprint according to said increase in voltage for a period of time that will not cause said temperature to exceed a temperature limit.
 16. A method comprising: adjusting a first clock signal at a first frequency to provide a second clock signal at a second frequency to a processing unit of a computer system and a third clock signal at a third frequency to a second component of said computer system; monitoring operating conditions of said processing unit; changing a level of voltage furnished to said processing unit according to said operating conditions in response to initiation of a change in frequency for said processing unit, starting a counter and stopping said first and second clock signals; in response to said counter reaching a specified value, restarting said first and second clock signals; and adjusting said second frequency in response to said change in frequency, wherein said second clock signal is individually adjustable without an adjustment to said third clock signal.
 17. The method of claim 16, further comprising: adjusting said first clock signal by a first value to furnish said second clock signal at said second frequency to said processing unit; and adjusting said first clock signal by a second value to furnish said third clock signal at said third frequency to said second component concurrent with furnishing of said second clock signal to said processing unit, wherein said second frequency is different from said third frequency.
 18. The method of claim 17, further comprising changing said first value to a third value responsive to said change in operating conditions, wherein said first value is individually adjustable without an adjustment to said second value.
 19. The method of claim 18, further comprising changing said second value to a fourth value responsive to said change in operating conditions, wherein the ratio of said first value to said third value is different from the ratio of said second value to said fourth value.
 20. The method of claim 16, further comprising selecting said level of voltage according to a frequency of a clock signal to be furnished to said processing unit.
 21. The method of claim 16, further comprising: detecting operations to be executed by said processing unit; and selecting a frequency of a clock signal furnished to said processing unit according to said operations.
 22. The method of claim 16, further comprising: monitoring a temperature of said processing unit; and selecting a frequency of a clock signal and a voltage furnished to said processing unit according to said temperature.
 23. A system comprising: means for monitoring operating conditions of a processing unit; means for generating a clock signal at a frequency; and means for adjusting said clock signal to provide clock signals at different frequencies to said processing unit and to a second component concurrently and for individually adjusting said different frequencies; wherein, in response to initiation of a change in frequency for said processing unit, a means for counting is started and clock signals to said processing unit and said second component are stopped; and wherein further, in response to said means for counting reaching a specified value, said clock signals to said processing unit and said second component are started.
 24. The system of claim 23 further comprising means for adjusting a selectable voltage supplied to said processing unit.
 25. The computer system of claim 10, further comprising a programmable power supply coupled to said processing unit and configured to furnish a level of voltage according to a frequency of a clock signal selected for said processing unit and to adjust said voltage as a precursor to a change in said frequency.
 26. The system of claim 23 further comprising means for maintaining time consistency between a clock for said processing unit and real world time after adjusting clock frequency for said processing unit.
 27. The method of claim 16, further comprising: determining an amount of time that operation is permitted with an increase in said voltage without increasing a temperature of said computer system beyond a limit; and operating said processing unit with said increase in voltage for a period of time that is less than said amount of time. 